home *** CD-ROM | disk | FTP | other *** search
- /* LogManager.h */
- /*
- * LogManager.h
- * Copyright © 1993 Apple Computer Inc. All rights reserved.
- *
- * These functions manage a logging display for error messages and other text.
- * The log is implemented as a ListManager list that can hold nLogItems. This
- * module is intentionally more-or-less self-contained so it can easily be
- * exported to other applications.
- */
- #ifndef THINK_C /* MPW includes */
- #include <Errors.h>
- #include <Script.h>
- #include <Types.h>
- #include <Resources.h>
- #include <QuickDraw.h>
- #include <Fonts.h>
- #include <Events.h>
- #include <Windows.h>
- #include <ToolUtils.h>
- #include <Memory.h>
- #include <Lists.h>
- #endif
- /*
- * CreateLog
- * Create a new log display in the current window. To define a log, first
- * SetPort to the window, and pass viewRect in window coordinates. Returns
- * NULL on errors. if nLogLines is zero, a default value (128) will be used.
- * Note: the log will be displayed with a horizontal and vertical scrollbar.
- * Be sure to dimension the viewRect to leave room for both. If hasGrowBox
- * is FALSE, the list rectangle will be adjusted so there is an integral
- * number of cells displayed.
- */
- ListHandle CreateLog(
- const Rect *viewRect,
- Boolean hasGrowBox,
- short listFontNumber,
- short listFontSize,
- short nLogLines
- );
- /*
- * DisposeLog
- * Dispose of the log. logListHandle may be NULL.
- */
- void DisposeLog(
- ListHandle logListHandle
- );
- /*
- * DoClickInLog
- * Call on a mouse-down in the log viewRect. Returns FALSE if the mouse-down
- * wasn't in the viewRect (this isn't really an error, but lets you call
- * DoClickInLog on all mouseDown's). Note: the port should be set to the log
- * window. You cannot select text in the log.
- */
- Boolean DoClickInLog(
- ListHandle logListHandle,
- const EventRecord *eventRecord
- );
- /*
- * UpdateLog
- * Call on update events in the log window.
- */
- void UpdateLog(
- ListHandle logListHandle
- );
- /*
- * ActivateLog
- * Call on activate, suspend, and resume events.
- */
- void ActivateLog(
- ListHandle logListHandle,
- Boolean activating
- );
- /*
- * MoveLog
- * Move the log area within the window.
- */
- void MoveLog(
- ListHandle logListHandle,
- short leftEdge,
- short topEdge
- );
- /*
- * SizeLog
- * Change the size of the log area.
- */
- void SizeLog(
- ListHandle logListHandle,
- short newWidth,
- short newHeight
- );
- /*
- * LogStatus
- * Call with an error status code and some text to display.
- */
- void LogStatus(
- ListHandle logListHandle,
- OSErr theError,
- const StringPtr infoText
- );
- /*
- * DisplayLogString
- * Call with some text to display.
- */
- void DisplayLogString(
- ListHandle logListHandle,
- const StringPtr theString
- );
-